home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 44 / PC Actual CD 44.iso / Linux / Cygwin / full.exe / Disk1 / data1.cab / Tools / include / tcl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-12-04  |  58.1 KB  |  1,501 lines

  1. /*
  2.  * tcl.h --
  3.  *
  4.  *    This header file describes the externally-visible facilities
  5.  *    of the Tcl interpreter.
  6.  *
  7.  * Copyright (c) 1987-1994 The Regents of the University of California.
  8.  * Copyright (c) 1994-1997 Sun Microsystems, Inc.
  9.  * Copyright (c) 1993-1996 Lucent Technologies.
  10.  *
  11.  * See the file "license.terms" for information on usage and redistribution
  12.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  13.  *
  14.  * SCCS: @(#) tcl.h 1.326 97/11/20 12:40:43
  15.  */
  16.  
  17. #ifndef _TCL
  18. #define _TCL
  19.  
  20. /*
  21.  * When version numbers change here, must also go into the following files
  22.  * and update the version numbers:
  23.  *
  24.  * library/init.tcl
  25.  * unix/configure.in
  26.  * unix/pkginfo
  27.  * win/makefile.bc
  28.  * win/makefile.vc
  29.  *
  30.  * The release level should be  0 for alpha, 1 for beta, and 2 for
  31.  * final/patch.  The release serial value is the number that follows the
  32.  * "a", "b", or "p" in the patch level; for example, if the patch level
  33.  * is 7.6b2, TCL_RELEASE_SERIAL is 2.  It restarts at 1 whenever the
  34.  * release level is changed, except for the final release which is 0
  35.  * (the first patch will start at 1).
  36.  */
  37.  
  38. #define TCL_MAJOR_VERSION   8
  39. #define TCL_MINOR_VERSION   0
  40. #define TCL_RELEASE_LEVEL   2
  41. #define TCL_RELEASE_SERIAL  2
  42.  
  43. #define TCL_VERSION        "8.0"
  44. #define TCL_PATCH_LEVEL        "8.0p2"
  45.  
  46. /*
  47.  * The following definitions set up the proper options for Windows
  48.  * compilers.  We use this method because there is no autoconf equivalent.
  49.  */
  50.  
  51. #ifndef __WIN32__
  52. #   if defined(_WIN32) || defined(WIN32)
  53. #    define __WIN32__
  54. #   endif
  55. #endif
  56.  
  57. #ifdef __WIN32__
  58. #   ifndef STRICT
  59. #    define STRICT
  60. #   endif
  61. #   ifndef USE_PROTOTYPE
  62. #    define USE_PROTOTYPE 1
  63. #   endif
  64. #   ifndef HAS_STDARG
  65. #    define HAS_STDARG 1
  66. #   endif
  67. #   ifndef USE_PROTOTYPE
  68. #    define USE_PROTOTYPE 1
  69. #   endif
  70. #   ifndef USE_TCLALLOC
  71. #    define USE_TCLALLOC 1
  72. #   endif
  73. #   ifndef STRINGIFY
  74. #    define STRINGIFY(x)        STRINGIFY1(x)
  75. #    define STRINGIFY1(x)        #x
  76. #   endif
  77. #endif /* __WIN32__ */
  78.  
  79. /*
  80.  * The following definitions set up the proper options for Macintosh
  81.  * compilers.  We use this method because there is no autoconf equivalent.
  82.  */
  83.  
  84. #ifdef MAC_TCL
  85. #   ifndef HAS_STDARG
  86. #    define HAS_STDARG 1
  87. #   endif
  88. #   ifndef USE_TCLALLOC
  89. #    define USE_TCLALLOC 1
  90. #   endif
  91. #   ifndef NO_STRERROR
  92. #    define NO_STRERROR 1
  93. #   endif
  94. #endif
  95.  
  96. /* 
  97.  * A special definition used to allow this header file to be included 
  98.  * in resource files so that they can get obtain version information from
  99.  * this file.  Resource compilers don't like all the C stuff, like typedefs
  100.  * and procedure declarations, that occur below.
  101.  */
  102.  
  103. #ifndef RESOURCE_INCLUDED
  104.  
  105. #ifndef BUFSIZ
  106. #include <stdio.h>
  107. #endif
  108.  
  109. /*
  110.  * Definitions that allow Tcl functions with variable numbers of
  111.  * arguments to be used with either varargs.h or stdarg.h.  TCL_VARARGS
  112.  * is used in procedure prototypes.  TCL_VARARGS_DEF is used to declare
  113.  * the arguments in a function definiton: it takes the type and name of
  114.  * the first argument and supplies the appropriate argument declaration
  115.  * string for use in the function definition.  TCL_VARARGS_START
  116.  * initializes the va_list data structure and returns the first argument.
  117.  */
  118.  
  119. #if defined(__STDC__) || defined(HAS_STDARG)
  120. #   define TCL_VARARGS(type, name) (type name, ...)
  121. #   define TCL_VARARGS_DEF(type, name) (type name, ...)
  122. #   define TCL_VARARGS_START(type, name, list) (va_start(list, name), name)
  123. #else
  124. #   ifdef __cplusplus
  125. #    define TCL_VARARGS(type, name) (type name, ...)
  126. #    define TCL_VARARGS_DEF(type, name) (type va_alist, ...)
  127. #   else
  128. #    define TCL_VARARGS(type, name) ()
  129. #    define TCL_VARARGS_DEF(type, name) (va_alist)
  130. #   endif
  131. #   define TCL_VARARGS_START(type, name, list) \
  132.     (va_start(list), va_arg(list, type))
  133. #endif
  134.  
  135. /*
  136.  * Definitions that allow this header file to be used either with or
  137.  * without ANSI C features like function prototypes.
  138.  */
  139.  
  140. #undef _ANSI_ARGS_
  141. #undef CONST
  142.  
  143. #if ((defined(__STDC__) || defined(SABER)) && !defined(NO_PROTOTYPE)) || defined(__cplusplus) || defined(USE_PROTOTYPE)
  144. #   define _USING_PROTOTYPES_ 1
  145. #   define _ANSI_ARGS_(x)    x
  146. #   define CONST const
  147. #else
  148. #   define _ANSI_ARGS_(x)    ()
  149. #   define CONST
  150. #endif
  151.  
  152. #ifdef __cplusplus
  153. #   define EXTERN extern "C"
  154. #else
  155. #   define EXTERN extern
  156. #endif
  157.  
  158. /*
  159.  * Macro to use instead of "void" for arguments that must have
  160.  * type "void *" in ANSI C;  maps them to type "char *" in
  161.  * non-ANSI systems.
  162.  */
  163. #ifndef __WIN32__
  164. #ifndef VOID
  165. #   ifdef __STDC__
  166. #       define VOID void
  167. #   else
  168. #       define VOID char
  169. #   endif
  170. #endif
  171. #else /* __WIN32__ */
  172. /*
  173.  * The following code is copied from winnt.h
  174.  */
  175. #ifndef VOID
  176. #define VOID void
  177. typedef char CHAR;
  178. typedef short SHORT;
  179. typedef long LONG;
  180. #endif
  181. #endif /* __WIN32__ */
  182.  
  183. /*
  184.  * Miscellaneous declarations.
  185.  */
  186.  
  187. #ifndef NULL
  188. #define NULL 0
  189. #endif
  190.  
  191. #ifndef _CLIENTDATA
  192. #   if defined(__STDC__) || defined(__cplusplus)
  193.     typedef void *ClientData;
  194. #   else
  195.     typedef int *ClientData;
  196. #   endif /* __STDC__ */
  197. #define _CLIENTDATA
  198. #endif
  199.  
  200. /*
  201.  * Data structures defined opaquely in this module. The definitions below
  202.  * just provide dummy types. A few fields are made visible in Tcl_Interp
  203.  * structures, namely those used for returning a string result from
  204.  * commands. Direct access to the result field is discouraged in Tcl 8.0.
  205.  * The interpreter result is either an object or a string, and the two
  206.  * values are kept consistent unless some C code sets interp->result
  207.  * directly. Programmers should use either the procedure Tcl_GetObjResult()
  208.  * or Tcl_GetStringResult() to read the interpreter's result. See the
  209.  * SetResult man page for details.
  210.  * 
  211.  * Note: any change to the Tcl_Interp definition below must be mirrored
  212.  * in the "real" definition in tclInt.h.
  213.  *
  214.  * Note: Tcl_ObjCmdProc procedures do not directly set result and freeProc.
  215.  * Instead, they set a Tcl_Obj member in the "real" structure that can be
  216.  * accessed with Tcl_GetObjResult() and Tcl_SetObjResult().
  217.  */
  218.  
  219. typedef struct Tcl_Interp {
  220.     char *result;        /* If the last command returned a string
  221.                  * result, this points to it. */
  222.     void (*freeProc) _ANSI_ARGS_((char *blockPtr));
  223.                 /* Zero means the string result is
  224.                  * statically allocated. TCL_DYNAMIC means
  225.                  * it was allocated with ckalloc and should
  226.                  * be freed with ckfree. Other values give
  227.                  * the address of procedure to invoke to
  228.                  * free the result. Tcl_Eval must free it
  229.                  * before executing next command. */
  230.     int errorLine;              /* When TCL_ERROR is returned, this gives
  231.                                  * the line number within the command where
  232.                                  * the error occurred (1 if first line). */
  233. } Tcl_Interp;
  234.  
  235. typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
  236. typedef struct Tcl_Channel_ *Tcl_Channel;
  237. typedef struct Tcl_Command_ *Tcl_Command;
  238. typedef struct Tcl_Event Tcl_Event;
  239. typedef struct Tcl_Pid_ *Tcl_Pid;
  240. typedef struct Tcl_RegExp_ *Tcl_RegExp;
  241. typedef struct Tcl_TimerToken_ *Tcl_TimerToken;
  242. typedef struct Tcl_Trace_ *Tcl_Trace;
  243. typedef struct Tcl_Var_ *Tcl_Var;
  244.  
  245. /*
  246.  * When a TCL command returns, the interpreter contains a result from the
  247.  * command. Programmers are strongly encouraged to use one of the
  248.  * procedures Tcl_GetObjResult() or Tcl_GetStringResult() to read the
  249.  * interpreter's result. See the SetResult man page for details. Besides
  250.  * this result, the command procedure returns an integer code, which is 
  251.  * one of the following:
  252.  *
  253.  * TCL_OK        Command completed normally; the interpreter's
  254.  *            result contains    the command's result.
  255.  * TCL_ERROR        The command couldn't be completed successfully;
  256.  *            the interpreter's result describes what went wrong.
  257.  * TCL_RETURN        The command requests that the current procedure
  258.  *            return; the interpreter's result contains the
  259.  *            procedure's return value.
  260.  * TCL_BREAK        The command requests that the innermost loop
  261.  *            be exited; the interpreter's result is meaningless.
  262.  * TCL_CONTINUE        Go on to the next iteration of the current loop;
  263.  *            the interpreter's result is meaningless.
  264.  */
  265.  
  266. #define TCL_OK        0
  267. #define TCL_ERROR    1
  268. #define TCL_RETURN    2
  269. #define TCL_BREAK    3
  270. #define TCL_CONTINUE    4
  271.  
  272. #define TCL_RESULT_SIZE 200
  273.  
  274. /*
  275.  * Argument descriptors for math function callbacks in expressions:
  276.  */
  277.  
  278. typedef enum {TCL_INT, TCL_DOUBLE, TCL_EITHER} Tcl_ValueType;
  279. typedef struct Tcl_Value {
  280.     Tcl_ValueType type;        /* Indicates intValue or doubleValue is
  281.                  * valid, or both. */
  282.     long intValue;        /* Integer value. */
  283.     double doubleValue;        /* Double-precision floating value. */
  284. } Tcl_Value;
  285.  
  286. /*
  287.  * Forward declaration of Tcl_Obj to prevent an error when the forward
  288.  * reference to Tcl_Obj is encountered in the procedure types declared 
  289.  * below.
  290.  */
  291.  
  292. struct Tcl_Obj;
  293.  
  294. /*
  295.  * Procedure types defined by Tcl:
  296.  */
  297.  
  298. typedef int (Tcl_AppInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
  299. typedef int (Tcl_AsyncProc) _ANSI_ARGS_((ClientData clientData,
  300.     Tcl_Interp *interp, int code));
  301. typedef void (Tcl_ChannelProc) _ANSI_ARGS_((ClientData clientData, int mask));
  302. typedef void (Tcl_CloseProc) _ANSI_ARGS_((ClientData data));
  303. typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData));
  304. typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData,
  305.     Tcl_Interp *interp, int argc, char *argv[]));
  306. typedef void (Tcl_CmdTraceProc) _ANSI_ARGS_((ClientData clientData,
  307.     Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *proc,
  308.     ClientData cmdClientData, int argc, char *argv[]));
  309. typedef void (Tcl_DupInternalRepProc) _ANSI_ARGS_((struct Tcl_Obj *srcPtr, 
  310.         struct Tcl_Obj *dupPtr));
  311. typedef int (Tcl_EventProc) _ANSI_ARGS_((Tcl_Event *evPtr, int flags));
  312. typedef void (Tcl_EventCheckProc) _ANSI_ARGS_((ClientData clientData,
  313.     int flags));
  314. typedef int (Tcl_EventDeleteProc) _ANSI_ARGS_((Tcl_Event *evPtr,
  315.         ClientData clientData));
  316. typedef void (Tcl_EventSetupProc) _ANSI_ARGS_((ClientData clientData,
  317.     int flags));
  318. typedef void (Tcl_ExitProc) _ANSI_ARGS_((ClientData clientData));
  319. typedef void (Tcl_FileProc) _ANSI_ARGS_((ClientData clientData, int mask));
  320. typedef void (Tcl_FileFreeProc) _ANSI_ARGS_((ClientData clientData));
  321. typedef void (Tcl_FreeInternalRepProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr));
  322. typedef void (Tcl_FreeProc) _ANSI_ARGS_((char *blockPtr));
  323. typedef void (Tcl_IdleProc) _ANSI_ARGS_((ClientData clientData));
  324. typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData,
  325.     Tcl_Interp *interp));
  326. typedef int (Tcl_MathProc) _ANSI_ARGS_((ClientData clientData,
  327.     Tcl_Interp *interp, Tcl_Value *args, Tcl_Value *resultPtr));
  328. typedef void (Tcl_NamespaceDeleteProc) _ANSI_ARGS_((ClientData clientData));
  329. typedef int (Tcl_ObjCmdProc) _ANSI_ARGS_((ClientData clientData,
  330.     Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST objv[]));
  331. typedef int (Tcl_PackageInitProc) _ANSI_ARGS_((Tcl_Interp *interp));
  332. typedef void (Tcl_TcpAcceptProc) _ANSI_ARGS_((ClientData callbackData,
  333.         Tcl_Channel chan, char *address, int port));
  334. typedef void (Tcl_TimerProc) _ANSI_ARGS_((ClientData clientData));
  335. typedef int (Tcl_SetFromAnyProc) _ANSI_ARGS_((Tcl_Interp *interp,
  336.     struct Tcl_Obj *objPtr));
  337. typedef void (Tcl_UpdateStringProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr));
  338. typedef char *(Tcl_VarTraceProc) _ANSI_ARGS_((ClientData clientData,
  339.     Tcl_Interp *interp, char *part1, char *part2, int flags));
  340.  
  341. /*
  342.  * The following structure represents a type of object, which is a
  343.  * particular internal representation for an object plus a set of
  344.  * procedures that provide standard operations on objects of that type.
  345.  */
  346.  
  347. typedef struct Tcl_ObjType {
  348.     char *name;            /* Name of the type, e.g. "int". */
  349.     Tcl_FreeInternalRepProc *freeIntRepProc;
  350.                 /* Called to free any storage for the type's
  351.                  * internal rep. NULL if the internal rep
  352.                  * does not need freeing. */
  353.     Tcl_DupInternalRepProc *dupIntRepProc;
  354.                     /* Called to create a new object as a copy
  355.                  * of an existing object. */
  356.     Tcl_UpdateStringProc *updateStringProc;
  357.                     /* Called to update the string rep from the
  358.                  * type's internal representation. */
  359.     Tcl_SetFromAnyProc *setFromAnyProc;
  360.                     /* Called to convert the object's internal
  361.                  * rep to this type. Frees the internal rep
  362.                  * of the old type. Returns TCL_ERROR on
  363.                  * failure. */
  364. } Tcl_ObjType;
  365.  
  366. /*
  367.  * One of the following structures exists for each object in the Tcl
  368.  * system. An object stores a value as either a string, some internal
  369.  * representation, or both.
  370.  */
  371.  
  372. typedef struct Tcl_Obj {
  373.     int refCount;        /* When 0 the object will be freed. */
  374.     char *bytes;        /* This points to the first byte of the
  375.                  * object's string representation. The array
  376.                  * must be followed by a null byte (i.e., at
  377.                  * offset length) but may also contain
  378.                  * embedded null characters. The array's
  379.                  * storage is allocated by ckalloc. NULL
  380.                  * means the string rep is invalid and must
  381.                  * be regenerated from the internal rep.
  382.                  * Clients should use Tcl_GetStringFromObj
  383.                  * to get a pointer to the byte array as a
  384.                  * readonly value. */
  385.     int length;            /* The number of bytes at *bytes, not
  386.                  * including the terminating null. */
  387.     Tcl_ObjType *typePtr;    /* Denotes the object's type. Always
  388.                  * corresponds to the type of the object's
  389.                  * internal rep. NULL indicates the object
  390.                  * has no internal rep (has no type). */
  391.     union {            /* The internal representation: */
  392.     long longValue;        /*   - an long integer value */
  393.     double doubleValue;    /*   - a double-precision floating value */
  394.     VOID *otherValuePtr;    /*   - another, type-specific value */
  395.     struct {        /*   - internal rep as two pointers */
  396.         VOID *ptr1;
  397.         VOID *ptr2;
  398.     } twoPtrValue;
  399.     } internalRep;
  400. } Tcl_Obj;
  401.  
  402. /*
  403.  * Macros to increment and decrement a Tcl_Obj's reference count, and to
  404.  * test whether an object is shared (i.e. has reference count > 1).
  405.  * Note: clients should use Tcl_DecrRefCount() when they are finished using
  406.  * an object, and should never call TclFreeObj() directly. TclFreeObj() is
  407.  * only defined and made public in tcl.h to support Tcl_DecrRefCount's macro
  408.  * definition. Note also that Tcl_DecrRefCount() refers to the parameter
  409.  * "obj" twice. This means that you should avoid calling it with an
  410.  * expression that is expensive to compute or has side effects.
  411.  */
  412.  
  413. EXTERN void        Tcl_IncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));
  414. EXTERN void        Tcl_DecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr));
  415. EXTERN int        Tcl_IsShared _ANSI_ARGS_((Tcl_Obj *objPtr));
  416.  
  417. #ifdef TCL_MEM_DEBUG
  418. #   define Tcl_IncrRefCount(objPtr) \
  419.     Tcl_DbIncrRefCount(objPtr, __FILE__, __LINE__)
  420. #   define Tcl_DecrRefCount(objPtr) \
  421.     Tcl_DbDecrRefCount(objPtr, __FILE__, __LINE__)
  422. #   define Tcl_IsShared(objPtr) \
  423.     Tcl_DbIsShared(objPtr, __FILE__, __LINE__)
  424. #else
  425. #   define Tcl_IncrRefCount(objPtr) \
  426.     ++(objPtr)->refCount
  427. #   define Tcl_DecrRefCount(objPtr) \
  428.     if (--(objPtr)->refCount <= 0) TclFreeObj(objPtr)
  429. #   define Tcl_IsShared(objPtr) \
  430.     ((objPtr)->refCount > 1)
  431. #endif
  432.  
  433. /*
  434.  * Macros and definitions that help to debug the use of Tcl objects.
  435.  * When TCL_MEM_DEBUG is defined, the Tcl_New* declarations are 
  436.  * overridden to call debugging versions of the object creation procedures.
  437.  */
  438.  
  439. EXTERN Tcl_Obj *    Tcl_NewBooleanObj _ANSI_ARGS_((int boolValue));
  440. EXTERN Tcl_Obj *    Tcl_NewDoubleObj _ANSI_ARGS_((double doubleValue));
  441. EXTERN Tcl_Obj *    Tcl_NewIntObj _ANSI_ARGS_((int intValue));
  442. EXTERN Tcl_Obj *    Tcl_NewListObj _ANSI_ARGS_((int objc,
  443.                 Tcl_Obj *CONST objv[]));
  444. EXTERN Tcl_Obj *    Tcl_NewLongObj _ANSI_ARGS_((long longValue));
  445. EXTERN Tcl_Obj *    Tcl_NewObj _ANSI_ARGS_((void));
  446. EXTERN Tcl_Obj *    Tcl_NewStringObj _ANSI_ARGS_((char *bytes,
  447.                 int length));
  448.  
  449. #ifdef TCL_MEM_DEBUG
  450. #  define Tcl_NewBooleanObj(val) \
  451.      Tcl_DbNewBooleanObj(val, __FILE__, __LINE__)
  452. #  define Tcl_NewDoubleObj(val) \
  453.      Tcl_DbNewDoubleObj(val, __FILE__, __LINE__)
  454. #  define Tcl_NewIntObj(val) \
  455.      Tcl_DbNewLongObj(val, __FILE__, __LINE__)
  456. #  define Tcl_NewListObj(objc, objv) \
  457.      Tcl_DbNewListObj(objc, objv, __FILE__, __LINE__)
  458. #  define Tcl_NewLongObj(val) \
  459.      Tcl_DbNewLongObj(val, __FILE__, __LINE__)
  460. #  define Tcl_NewObj() \
  461.      Tcl_DbNewObj(__FILE__, __LINE__)
  462. #  define Tcl_NewStringObj(bytes, len) \
  463.      Tcl_DbNewStringObj(bytes, len, __FILE__, __LINE__)
  464. #endif /* TCL_MEM_DEBUG */
  465.  
  466. /*
  467.  * The following definitions support Tcl's namespace facility.
  468.  * Note: the first five fields must match exactly the fields in a
  469.  * Namespace structure (see tcl.h). 
  470.  */
  471.  
  472. typedef struct Tcl_Namespace {
  473.     char *name;                 /* The namespace's name within its parent
  474.                  * namespace. This contains no ::'s. The
  475.                  * name of the global namespace is ""
  476.                  * although "::" is an synonym. */
  477.     char *fullName;             /* The namespace's fully qualified name.
  478.                  * This starts with ::. */
  479.     ClientData clientData;      /* Arbitrary value associated with this
  480.                  * namespace. */
  481.     Tcl_NamespaceDeleteProc* deleteProc;
  482.                                 /* Procedure invoked when deleting the
  483.                  * namespace to, e.g., free clientData. */
  484.     struct Tcl_Namespace* parentPtr;
  485.                                 /* Points to the namespace that contains
  486.                  * this one. NULL if this is the global
  487.                  * namespace. */
  488. } Tcl_Namespace;
  489.  
  490. /*
  491.  * The following structure represents a call frame, or activation record.
  492.  * A call frame defines a naming context for a procedure call: its local
  493.  * scope (for local variables) and its namespace scope (used for non-local
  494.  * variables; often the global :: namespace). A call frame can also define
  495.  * the naming context for a namespace eval or namespace inscope command:
  496.  * the namespace in which the command's code should execute. The
  497.  * Tcl_CallFrame structures exist only while procedures or namespace
  498.  * eval/inscope's are being executed, and provide a Tcl call stack.
  499.  * 
  500.  * A call frame is initialized and pushed using Tcl_PushCallFrame and
  501.  * popped using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be
  502.  * provided by the Tcl_PushCallFrame caller, and callers typically allocate
  503.  * them on the C call stack for efficiency. For this reason, Tcl_CallFrame
  504.  * is defined as a structure and not as an opaque token. However, most
  505.  * Tcl_CallFrame fields are hidden since applications should not access
  506.  * them directly; others are declared as "dummyX".
  507.  *
  508.  * WARNING!! The structure definition must be kept consistent with the
  509.  * CallFrame structure in tclInt.h. If you change one, change the other.
  510.  */
  511.  
  512. typedef struct Tcl_CallFrame {
  513.     Tcl_Namespace *nsPtr;
  514.     int dummy1;
  515.     int dummy2;
  516.     char *dummy3;
  517.     char *dummy4;
  518.     char *dummy5;
  519.     int dummy6;
  520.     char *dummy7;
  521.     char *dummy8;
  522.     int dummy9;
  523.     char* dummy10;
  524. } Tcl_CallFrame;
  525.  
  526. /*
  527.  * Information about commands that is returned by Tcl_GetCommandInfo and
  528.  * passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based
  529.  * command procedure while proc is a traditional Tcl argc/argv
  530.  * string-based procedure. Tcl_CreateObjCommand and Tcl_CreateCommand
  531.  * ensure that both objProc and proc are non-NULL and can be called to
  532.  * execute the command. However, it may be faster to call one instead of
  533.  * the other. The member isNativeObjectProc is set to 1 if an
  534.  * object-based procedure was registered by Tcl_CreateObjCommand, and to
  535.  * 0 if a string-based procedure was registered by Tcl_CreateCommand.
  536.  * The other procedure is typically set to a compatibility wrapper that
  537.  * does string-to-object or object-to-string argument conversions then
  538.  * calls the other procedure.
  539.  */
  540.      
  541. typedef struct Tcl_CmdInfo {
  542.     int isNativeObjectProc;     /* 1 if objProc was registered by a call to
  543.                   * Tcl_CreateObjCommand; 0 otherwise.
  544.                   * Tcl_SetCmdInfo does not modify this
  545.                   * field. */
  546.     Tcl_ObjCmdProc *objProc;     /* Command's object-based procedure. */
  547.     ClientData objClientData;     /* ClientData for object proc. */
  548.     Tcl_CmdProc *proc;         /* Command's string-based procedure. */
  549.     ClientData clientData;     /* ClientData for string proc. */
  550.     Tcl_CmdDeleteProc *deleteProc;
  551.                                  /* Procedure to call when command is
  552.                                   * deleted. */
  553.     ClientData deleteData;     /* Value to pass to deleteProc (usually
  554.                   * the same as clientData). */
  555.     Tcl_Namespace *namespacePtr; /* Points to the namespace that contains
  556.                   * this command. Note that Tcl_SetCmdInfo
  557.                   * will not change a command's namespace;
  558.                   * use Tcl_RenameCommand to do that. */
  559.  
  560. } Tcl_CmdInfo;
  561.  
  562. /*
  563.  * The structure defined below is used to hold dynamic strings.  The only
  564.  * field that clients should use is the string field, and they should
  565.  * never modify it.
  566.  */
  567.  
  568. #define TCL_DSTRING_STATIC_SIZE 200
  569. typedef struct Tcl_DString {
  570.     char *string;        /* Points to beginning of string:  either
  571.                  * staticSpace below or a malloced array. */
  572.     int length;            /* Number of non-NULL characters in the
  573.                  * string. */
  574.     int spaceAvl;        /* Total number of bytes available for the
  575.                  * string and its terminating NULL char. */
  576.     char staticSpace[TCL_DSTRING_STATIC_SIZE];
  577.                 /* Space to use in common case where string
  578.                  * is small. */
  579. } Tcl_DString;
  580.  
  581. #define Tcl_DStringLength(dsPtr) ((dsPtr)->length)
  582. #define Tcl_DStringValue(dsPtr) ((dsPtr)->string)
  583. #define Tcl_DStringTrunc Tcl_DStringSetLength
  584.  
  585. /*
  586.  * Definitions for the maximum number of digits of precision that may
  587.  * be specified in the "tcl_precision" variable, and the number of
  588.  * characters of buffer space required by Tcl_PrintDouble.
  589.  */
  590.  
  591. #define TCL_MAX_PREC 17
  592. #define TCL_DOUBLE_SPACE (TCL_MAX_PREC+10)
  593.  
  594. /*
  595.  * Flag that may be passed to Tcl_ConvertElement to force it not to
  596.  * output braces (careful!  if you change this flag be sure to change
  597.  * the definitions at the front of tclUtil.c).
  598.  */
  599.  
  600. #define TCL_DONT_USE_BRACES    1
  601.  
  602. /*
  603.  * Flag that may be passed to Tcl_GetIndexFromObj to force it to disallow
  604.  * abbreviated strings.
  605.  */
  606.  
  607. #define TCL_EXACT    1
  608.  
  609. /*
  610.  * Flag values passed to Tcl_RecordAndEval.
  611.  * WARNING: these bit choices must not conflict with the bit choices
  612.  * for evalFlag bits in tclInt.h!!
  613.  */
  614.  
  615. #define TCL_NO_EVAL        0x10000
  616. #define TCL_EVAL_GLOBAL        0x20000
  617.  
  618. /*
  619.  * Special freeProc values that may be passed to Tcl_SetResult (see
  620.  * the man page for details):
  621.  */
  622.  
  623. #define TCL_VOLATILE    ((Tcl_FreeProc *) 1)
  624. #define TCL_STATIC    ((Tcl_FreeProc *) 0)
  625. #define TCL_DYNAMIC    ((Tcl_FreeProc *) 3)
  626.  
  627. /*
  628.  * Flag values passed to variable-related procedures.
  629.  */
  630.  
  631. #define TCL_GLOBAL_ONLY         1
  632. #define TCL_NAMESPACE_ONLY     2
  633. #define TCL_APPEND_VALUE     4
  634. #define TCL_LIST_ELEMENT     8
  635. #define TCL_TRACE_READS         0x10
  636. #define TCL_TRACE_WRITES     0x20
  637. #define TCL_TRACE_UNSETS     0x40
  638. #define TCL_TRACE_DESTROYED     0x80
  639. #define TCL_INTERP_DESTROYED     0x100
  640. #define TCL_LEAVE_ERR_MSG     0x200
  641. #define TCL_PARSE_PART1         0x400
  642.  
  643. /*
  644.  * Types for linked variables:
  645.  */
  646.  
  647. #define TCL_LINK_INT        1
  648. #define TCL_LINK_DOUBLE        2
  649. #define TCL_LINK_BOOLEAN    3
  650. #define TCL_LINK_STRING        4
  651. #define TCL_LINK_READ_ONLY    0x80
  652.  
  653. /*
  654.  * The following declarations either map ckalloc and ckfree to
  655.  * malloc and free, or they map them to procedures with all sorts
  656.  * of debugging hooks defined in tclCkalloc.c.
  657.  */
  658.  
  659. EXTERN char *        Tcl_Alloc _ANSI_ARGS_((unsigned int size));
  660. EXTERN void        Tcl_Free _ANSI_ARGS_((char *ptr));
  661. EXTERN char *        Tcl_Realloc _ANSI_ARGS_((char *ptr,
  662.                 unsigned int size));
  663.  
  664. #ifdef TCL_MEM_DEBUG
  665.  
  666. #  define Tcl_Alloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
  667. #  define Tcl_Free(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
  668. #  define Tcl_Realloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
  669. #  define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
  670. #  define ckfree(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
  671. #  define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
  672.  
  673. EXTERN int        Tcl_DumpActiveMemory _ANSI_ARGS_((char *fileName));
  674. EXTERN void        Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,
  675.                 int line));
  676.  
  677. #else
  678.  
  679. /* CYGNUS LOCAL: Always use TCLALLOC.  This means that calls to malloc
  680.    will always be checked to make sure that malloc succeeded.
  681.  
  682.    NOTE: In tcl8.1a2, the definition of TclpAlloc was removed from
  683.    unix/tclUnixPort.h.  That means that in tcl8.1a2, this will wind up
  684.    calling the special allocator in tclAlloc.c, which would be bad.
  685.    When tcl 8.1 is imported, this needs to be checked.  */
  686. #ifndef USE_TCLALLOC
  687. #define USE_TCLALLOC 1
  688. #endif
  689. /* END CYGNUS LOCAL */
  690.  
  691. #  if USE_TCLALLOC
  692. #     define ckalloc(x) Tcl_Alloc(x)
  693. #     define ckfree(x) Tcl_Free(x)
  694. #     define ckrealloc(x,y) Tcl_Realloc(x,y)
  695. #  else
  696. #     define ckalloc(x) malloc(x)
  697. #     define ckfree(x)  free(x)
  698. #     define ckrealloc(x,y) realloc(x,y)
  699. #  endif
  700. #  define Tcl_DumpActiveMemory(x)
  701. #  define Tcl_ValidateAllMemory(x,y)
  702.  
  703. #endif /* TCL_MEM_DEBUG */
  704.  
  705. /*
  706.  * Forward declaration of Tcl_HashTable.  Needed by some C++ compilers
  707.  * to prevent errors when the forward reference to Tcl_HashTable is
  708.  * encountered in the Tcl_HashEntry structure.
  709.  */
  710.  
  711. #ifdef __cplusplus
  712. struct Tcl_HashTable;
  713. #endif
  714.  
  715. /*
  716.  * Structure definition for an entry in a hash table.  No-one outside
  717.  * Tcl should access any of these fields directly;  use the macros
  718.  * defined below.
  719.  */
  720.  
  721. typedef struct Tcl_HashEntry {
  722.     struct Tcl_HashEntry *nextPtr;    /* Pointer to next entry in this
  723.                      * hash bucket, or NULL for end of
  724.                      * chain. */
  725.     struct Tcl_HashTable *tablePtr;    /* Pointer to table containing entry. */
  726.     struct Tcl_HashEntry **bucketPtr;    /* Pointer to bucket that points to
  727.                      * first entry in this entry's chain:
  728.                      * used for deleting the entry. */
  729.     ClientData clientData;        /* Application stores something here
  730.                      * with Tcl_SetHashValue. */
  731.     union {                /* Key has one of these forms: */
  732.     char *oneWordValue;        /* One-word value for key. */
  733.     int words[1];            /* Multiple integer words for key.
  734.                      * The actual size will be as large
  735.                      * as necessary for this table's
  736.                      * keys. */
  737.     char string[4];            /* String for key.  The actual size
  738.                      * will be as large as needed to hold
  739.                      * the key. */
  740.     } key;                /* MUST BE LAST FIELD IN RECORD!! */
  741. } Tcl_HashEntry;
  742.  
  743. /*
  744.  * Structure definition for a hash table.  Must be in tcl.h so clients
  745.  * can allocate space for these structures, but clients should never
  746.  * access any fields in this structure.
  747.  */
  748.  
  749. #define TCL_SMALL_HASH_TABLE 4
  750. typedef struct Tcl_HashTable {
  751.     Tcl_HashEntry **buckets;        /* Pointer to bucket array.  Each
  752.                      * element points to first entry in
  753.                      * bucket's hash chain, or NULL. */
  754.     Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
  755.                     /* Bucket array used for small tables
  756.                      * (to avoid mallocs and frees). */
  757.     int numBuckets;            /* Total number of buckets allocated
  758.                      * at **bucketPtr. */
  759.     int numEntries;            /* Total number of entries present
  760.                      * in table. */
  761.     int rebuildSize;            /* Enlarge table when numEntries gets
  762.                      * to be this large. */
  763.     int downShift;            /* Shift count used in hashing
  764.                      * function.  Designed to use high-
  765.                      * order bits of randomized keys. */
  766.     int mask;                /* Mask value used in hashing
  767.                      * function. */
  768.     int keyType;            /* Type of keys used in this table. 
  769.                      * It's either TCL_STRING_KEYS,
  770.                      * TCL_ONE_WORD_KEYS, or an integer
  771.                      * giving the number of ints that
  772.                                          * is the size of the key.
  773.                      */
  774.     Tcl_HashEntry *(*findProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
  775.         CONST char *key));
  776.     Tcl_HashEntry *(*createProc) _ANSI_ARGS_((struct Tcl_HashTable *tablePtr,
  777.         CONST char *key, int *newPtr));
  778. } Tcl_HashTable;
  779.  
  780. /*
  781.  * Structure definition for information used to keep track of searches
  782.  * through hash tables:
  783.  */
  784.  
  785. typedef struct Tcl_HashSearch {
  786.     Tcl_HashTable *tablePtr;        /* Table being searched. */
  787.     int nextIndex;            /* Index of next bucket to be
  788.                      * enumerated after present one. */
  789.     Tcl_HashEntry *nextEntryPtr;    /* Next entry to be enumerated in the
  790.                      * the current bucket. */
  791. } Tcl_HashSearch;
  792.  
  793. /*
  794.  * Acceptable key types for hash tables:
  795.  */
  796.  
  797. #define TCL_STRING_KEYS        0
  798. #define TCL_ONE_WORD_KEYS    1
  799.  
  800. /*
  801.  * Macros for clients to use to access fields of hash entries:
  802.  */
  803.  
  804. #define Tcl_GetHashValue(h) ((h)->clientData)
  805. #define Tcl_SetHashValue(h, value) ((h)->clientData = (ClientData) (value))
  806. #define Tcl_GetHashKey(tablePtr, h) \
  807.     ((char *) (((tablePtr)->keyType == TCL_ONE_WORD_KEYS) ? (h)->key.oneWordValue \
  808.                         : (h)->key.string))
  809.  
  810. /*
  811.  * Macros to use for clients to use to invoke find and create procedures
  812.  * for hash tables:
  813.  */
  814.  
  815. #define Tcl_FindHashEntry(tablePtr, key) \
  816.     (*((tablePtr)->findProc))(tablePtr, key)
  817. #define Tcl_CreateHashEntry(tablePtr, key, newPtr) \
  818.     (*((tablePtr)->createProc))(tablePtr, key, newPtr)
  819.  
  820. /*
  821.  * Flag values to pass to Tcl_DoOneEvent to disable searches
  822.  * for some kinds of events:
  823.  */
  824.  
  825. #define TCL_DONT_WAIT        (1<<1)
  826. #define TCL_WINDOW_EVENTS    (1<<2)
  827. #define TCL_FILE_EVENTS        (1<<3)
  828. #define TCL_TIMER_EVENTS    (1<<4)
  829. #define TCL_IDLE_EVENTS        (1<<5)    /* WAS 0x10 ???? */
  830. #define TCL_ALL_EVENTS        (~TCL_DONT_WAIT)
  831.  
  832. /*
  833.  * The following structure defines a generic event for the Tcl event
  834.  * system.  These are the things that are queued in calls to Tcl_QueueEvent
  835.  * and serviced later by Tcl_DoOneEvent.  There can be many different
  836.  * kinds of events with different fields, corresponding to window events,
  837.  * timer events, etc.  The structure for a particular event consists of
  838.  * a Tcl_Event header followed by additional information specific to that
  839.  * event.
  840.  */
  841.  
  842. struct Tcl_Event {
  843.     Tcl_EventProc *proc;    /* Procedure to call to service this event. */
  844.     struct Tcl_Event *nextPtr;    /* Next in list of pending events, or NULL. */
  845. };
  846.  
  847. /*
  848.  * Positions to pass to Tcl_QueueEvent:
  849.  */
  850.  
  851. typedef enum {
  852.     TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, TCL_QUEUE_MARK
  853. } Tcl_QueuePosition;
  854.  
  855. /*
  856.  * Values to pass to Tcl_SetServiceMode to specify the behavior of notifier
  857.  * event routines.
  858.  */
  859.  
  860. #define TCL_SERVICE_NONE 0
  861. #define TCL_SERVICE_ALL 1
  862.  
  863. /*
  864.  * The following structure keeps is used to hold a time value, either as
  865.  * an absolute time (the number of seconds from the epoch) or as an
  866.  * elapsed time. On Unix systems the epoch is Midnight Jan 1, 1970 GMT.
  867.  * On Macintosh systems the epoch is Midnight Jan 1, 1904 GMT.
  868.  */
  869.  
  870. typedef struct Tcl_Time {
  871.     long sec;            /* Seconds. */
  872.     long usec;            /* Microseconds. */
  873. } Tcl_Time;
  874.  
  875. /*
  876.  * Bits to pass to Tcl_CreateFileHandler and Tcl_CreateChannelHandler
  877.  * to indicate what sorts of events are of interest:
  878.  */
  879.  
  880. #define TCL_READABLE    (1<<1)
  881. #define TCL_WRITABLE    (1<<2)
  882. #define TCL_EXCEPTION    (1<<3)
  883.  
  884. /*
  885.  * Flag values to pass to Tcl_OpenCommandChannel to indicate the
  886.  * disposition of the stdio handles.  TCL_STDIN, TCL_STDOUT, TCL_STDERR,
  887.  * are also used in Tcl_GetStdChannel.
  888.  */
  889.  
  890. #define TCL_STDIN        (1<<1)    
  891. #define TCL_STDOUT        (1<<2)
  892. #define TCL_STDERR        (1<<3)
  893. #define TCL_ENFORCE_MODE    (1<<4)
  894.  
  895. /*
  896.  * Typedefs for the various operations in a channel type:
  897.  */
  898.  
  899. typedef int    (Tcl_DriverBlockModeProc) _ANSI_ARGS_((
  900.             ClientData instanceData, int mode));
  901. typedef int    (Tcl_DriverCloseProc) _ANSI_ARGS_((ClientData instanceData,
  902.             Tcl_Interp *interp));
  903. typedef int    (Tcl_DriverInputProc) _ANSI_ARGS_((ClientData instanceData,
  904.             char *buf, int toRead, int *errorCodePtr));
  905. typedef int    (Tcl_DriverOutputProc) _ANSI_ARGS_((ClientData instanceData,
  906.             char *buf, int toWrite, int *errorCodePtr));
  907. typedef int    (Tcl_DriverSeekProc) _ANSI_ARGS_((ClientData instanceData,
  908.             long offset, int mode, int *errorCodePtr));
  909. typedef int    (Tcl_DriverSetOptionProc) _ANSI_ARGS_((
  910.             ClientData instanceData, Tcl_Interp *interp,
  911.                 char *optionName, char *value));
  912. typedef int    (Tcl_DriverGetOptionProc) _ANSI_ARGS_((
  913.             ClientData instanceData, Tcl_Interp *interp,
  914.             char *optionName, Tcl_DString *dsPtr));
  915. typedef void    (Tcl_DriverWatchProc) _ANSI_ARGS_((
  916.             ClientData instanceData, int mask));
  917. typedef int    (Tcl_DriverGetHandleProc) _ANSI_ARGS_((
  918.             ClientData instanceData, int direction,
  919.             ClientData *handlePtr));
  920.  
  921. /*
  922.  * Enum for different end of line translation and recognition modes.
  923.  */
  924.  
  925. typedef enum Tcl_EolTranslation {
  926.     TCL_TRANSLATE_AUTO,            /* Eol == \r, \n and \r\n. */
  927.     TCL_TRANSLATE_CR,            /* Eol == \r. */
  928.     TCL_TRANSLATE_LF,            /* Eol == \n. */
  929.     TCL_TRANSLATE_CRLF            /* Eol == \r\n. */
  930. } Tcl_EolTranslation;
  931.  
  932. /*
  933.  * struct Tcl_ChannelType:
  934.  *
  935.  * One such structure exists for each type (kind) of channel.
  936.  * It collects together in one place all the functions that are
  937.  * part of the specific channel type.
  938.  */
  939.  
  940. typedef struct Tcl_ChannelType {
  941.     char *typeName;            /* The name of the channel type in Tcl
  942.                                          * commands. This storage is owned by
  943.                                          * channel type. */
  944.     Tcl_DriverBlockModeProc *blockModeProc;
  945.                         /* Set blocking mode for the
  946.                                          * raw channel. May be NULL. */
  947.     Tcl_DriverCloseProc *closeProc;    /* Procedure to call to close
  948.                                          * the channel. */
  949.     Tcl_DriverInputProc *inputProc;    /* Procedure to call for input
  950.                                          * on channel. */
  951.     Tcl_DriverOutputProc *outputProc;    /* Procedure to call for output
  952.                                          * on channel. */
  953.     Tcl_DriverSeekProc *seekProc;    /* Procedure to call to seek
  954.                                          * on the channel. May be NULL. */
  955.     Tcl_DriverSetOptionProc *setOptionProc;
  956.                         /* Set an option on a channel. */
  957.     Tcl_DriverGetOptionProc *getOptionProc;
  958.                         /* Get an option from a channel. */
  959.     Tcl_DriverWatchProc *watchProc;    /* Set up the notifier to watch
  960.                                          * for events on this channel. */
  961.     Tcl_DriverGetHandleProc *getHandleProc;
  962.                     /* Get an OS handle from the channel
  963.                                          * or NULL if not supported. */
  964. } Tcl_ChannelType;
  965.  
  966. /*
  967.  * The following flags determine whether the blockModeProc above should
  968.  * set the channel into blocking or nonblocking mode. They are passed
  969.  * as arguments to the blockModeProc procedure in the above structure.
  970.  */
  971.  
  972. #define TCL_MODE_BLOCKING 0        /* Put channel into blocking mode. */
  973. #define TCL_MODE_NONBLOCKING 1        /* Put channel into nonblocking
  974.                      * mode. */
  975.  
  976. /*
  977.  * Enum for different types of file paths.
  978.  */
  979.  
  980. typedef enum Tcl_PathType {
  981.     TCL_PATH_ABSOLUTE,
  982.     TCL_PATH_RELATIVE,
  983.     TCL_PATH_VOLUME_RELATIVE
  984. } Tcl_PathType;
  985.  
  986. /*
  987.  * Exported Tcl procedures:
  988.  */
  989.  
  990. EXTERN void        Tcl_AddErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
  991.                 char *message));
  992. EXTERN void        Tcl_AddObjErrorInfo _ANSI_ARGS_((Tcl_Interp *interp,
  993.                 char *message, int length));
  994. EXTERN void        Tcl_AllowExceptions _ANSI_ARGS_((Tcl_Interp *interp));
  995. EXTERN int        Tcl_AppendAllObjTypes _ANSI_ARGS_((
  996.                 Tcl_Interp *interp, Tcl_Obj *objPtr));
  997. EXTERN void        Tcl_AppendElement _ANSI_ARGS_((Tcl_Interp *interp,
  998.                 char *string));
  999. EXTERN void        Tcl_AppendResult _ANSI_ARGS_(
  1000.                 TCL_VARARGS(Tcl_Interp *,interp));
  1001. EXTERN void        Tcl_AppendToObj _ANSI_ARGS_((Tcl_Obj *objPtr,
  1002.                 char *bytes, int length));
  1003. EXTERN void        Tcl_AppendStringsToObj _ANSI_ARGS_(
  1004.                 TCL_VARARGS(Tcl_Obj *,interp));
  1005. EXTERN int        Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
  1006. EXTERN Tcl_AsyncHandler    Tcl_AsyncCreate _ANSI_ARGS_((Tcl_AsyncProc *proc,
  1007.                 ClientData clientData));
  1008. EXTERN void        Tcl_AsyncDelete _ANSI_ARGS_((Tcl_AsyncHandler async));
  1009. EXTERN int        Tcl_AsyncInvoke _ANSI_ARGS_((Tcl_Interp *interp,
  1010.                 int code));
  1011. EXTERN void        Tcl_AsyncMark _ANSI_ARGS_((Tcl_AsyncHandler async));
  1012. EXTERN int        Tcl_AsyncReady _ANSI_ARGS_((void));
  1013. EXTERN void        Tcl_BackgroundError _ANSI_ARGS_((Tcl_Interp *interp));
  1014. EXTERN char        Tcl_Backslash _ANSI_ARGS_((CONST char *src,
  1015.                 int *readPtr));
  1016. EXTERN int        Tcl_BadChannelOption _ANSI_ARGS_((Tcl_Interp *interp,
  1017.                 char *optionName, char *optionList));
  1018. EXTERN void        Tcl_CallWhenDeleted _ANSI_ARGS_((Tcl_Interp *interp,
  1019.                 Tcl_InterpDeleteProc *proc,
  1020.                 ClientData clientData));
  1021. EXTERN void        Tcl_CancelIdleCall _ANSI_ARGS_((Tcl_IdleProc *idleProc,
  1022.                 ClientData clientData));
  1023. #define Tcl_Ckalloc Tcl_Alloc
  1024. #define Tcl_Ckfree Tcl_Free
  1025. #define Tcl_Ckrealloc Tcl_Realloc
  1026. EXTERN int        Tcl_Close _ANSI_ARGS_((Tcl_Interp *interp,
  1027.                     Tcl_Channel chan));
  1028. EXTERN int        Tcl_CommandComplete _ANSI_ARGS_((char *cmd));
  1029. EXTERN char *        Tcl_Concat _ANSI_ARGS_((int argc, char **argv));
  1030. EXTERN Tcl_Obj *    Tcl_ConcatObj _ANSI_ARGS_((int objc,
  1031.                 Tcl_Obj *CONST objv[]));
  1032. EXTERN int        Tcl_ConvertCountedElement _ANSI_ARGS_((CONST char *src,
  1033.                 int length, char *dst, int flags));
  1034. EXTERN int        Tcl_ConvertElement _ANSI_ARGS_((CONST char *src,
  1035.                 char *dst, int flags));
  1036. EXTERN int        Tcl_ConvertToType _ANSI_ARGS_((Tcl_Interp *interp,
  1037.                 Tcl_Obj *objPtr, Tcl_ObjType *typePtr));
  1038. EXTERN int        Tcl_CreateAlias _ANSI_ARGS_((Tcl_Interp *slave,
  1039.                 char *slaveCmd, Tcl_Interp *target,
  1040.                     char *targetCmd, int argc, char **argv));
  1041. EXTERN int        Tcl_CreateAliasObj _ANSI_ARGS_((Tcl_Interp *slave,
  1042.                 char *slaveCmd, Tcl_Interp *target,
  1043.                     char *targetCmd, int objc,
  1044.                     Tcl_Obj *CONST objv[]));
  1045. EXTERN Tcl_Channel    Tcl_CreateChannel _ANSI_ARGS_((
  1046.                     Tcl_ChannelType *typePtr, char *chanName,
  1047.                             ClientData instanceData, int mask));
  1048. EXTERN void        Tcl_CreateChannelHandler _ANSI_ARGS_((
  1049.                 Tcl_Channel chan, int mask,
  1050.                             Tcl_ChannelProc *proc, ClientData clientData));
  1051. EXTERN void        Tcl_CreateCloseHandler _ANSI_ARGS_((
  1052.                 Tcl_Channel chan, Tcl_CloseProc *proc,
  1053.                             ClientData clientData));
  1054. EXTERN Tcl_Command    Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp *interp,
  1055.                 char *cmdName, Tcl_CmdProc *proc,
  1056.                 ClientData clientData,
  1057.                 Tcl_CmdDeleteProc *deleteProc));
  1058. EXTERN void        Tcl_CreateEventSource _ANSI_ARGS_((
  1059.                 Tcl_EventSetupProc *setupProc,
  1060.                 Tcl_EventCheckProc *checkProc,
  1061.                 ClientData clientData));
  1062. EXTERN void        Tcl_CreateExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
  1063.                 ClientData clientData));
  1064. EXTERN void        Tcl_CreateFileHandler _ANSI_ARGS_((
  1065.                     int fd, int mask, Tcl_FileProc *proc,
  1066.                 ClientData clientData));
  1067. EXTERN Tcl_Interp *    Tcl_CreateInterp _ANSI_ARGS_((void));
  1068. EXTERN void        Tcl_CreateMathFunc _ANSI_ARGS_((Tcl_Interp *interp,
  1069.                 char *name, int numArgs, Tcl_ValueType *argTypes,
  1070.                 Tcl_MathProc *proc, ClientData clientData));
  1071. EXTERN Tcl_Command    Tcl_CreateObjCommand _ANSI_ARGS_((
  1072.                 Tcl_Interp *interp, char *cmdName,
  1073.                 Tcl_ObjCmdProc *proc, ClientData clientData,
  1074.                 Tcl_CmdDeleteProc *deleteProc));
  1075. EXTERN Tcl_Interp *    Tcl_CreateSlave _ANSI_ARGS_((Tcl_Interp *interp,
  1076.                     char *slaveName, int isSafe));
  1077. EXTERN Tcl_TimerToken    Tcl_CreateTimerHandler _ANSI_ARGS_((int milliseconds,
  1078.                 Tcl_TimerProc *proc, ClientData clientData));
  1079. EXTERN Tcl_Trace    Tcl_CreateTrace _ANSI_ARGS_((Tcl_Interp *interp,
  1080.                 int level, Tcl_CmdTraceProc *proc,
  1081.                 ClientData clientData));
  1082. EXTERN char *        Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,
  1083.                 char *file, int line));
  1084. EXTERN int        Tcl_DbCkfree _ANSI_ARGS_((char *ptr,
  1085.                 char *file, int line));
  1086. EXTERN char *        Tcl_DbCkrealloc _ANSI_ARGS_((char *ptr,
  1087.                 unsigned int size, char *file, int line));
  1088. EXTERN void        Tcl_DbDecrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr,
  1089.                 char *file, int line));
  1090. EXTERN void        Tcl_DbIncrRefCount _ANSI_ARGS_((Tcl_Obj *objPtr,
  1091.                 char *file, int line));
  1092. EXTERN int        Tcl_DbIsShared _ANSI_ARGS_((Tcl_Obj *objPtr,
  1093.                 char *file, int line));
  1094. EXTERN Tcl_Obj *    Tcl_DbNewBooleanObj _ANSI_ARGS_((int boolValue,
  1095.                             char *file, int line));
  1096. EXTERN Tcl_Obj *    Tcl_DbNewDoubleObj _ANSI_ARGS_((double doubleValue,
  1097.                             char *file, int line));
  1098. EXTERN Tcl_Obj *    Tcl_DbNewListObj _ANSI_ARGS_((int objc,
  1099.                 Tcl_Obj *CONST objv[], char *file, int line));
  1100. EXTERN Tcl_Obj *    Tcl_DbNewLongObj _ANSI_ARGS_((long longValue,
  1101.                             char *file, int line));
  1102. EXTERN Tcl_Obj *    Tcl_DbNewObj _ANSI_ARGS_((char *file, int line));
  1103. EXTERN Tcl_Obj *    Tcl_DbNewStringObj _ANSI_ARGS_((char *bytes,
  1104.                 int length, char *file, int line));
  1105. EXTERN void        Tcl_DeleteAssocData _ANSI_ARGS_((Tcl_Interp *interp,
  1106.                             char *name));
  1107. EXTERN int        Tcl_DeleteCommand _ANSI_ARGS_((Tcl_Interp *interp,
  1108.                 char *cmdName));
  1109. EXTERN int        Tcl_DeleteCommandFromToken _ANSI_ARGS_((
  1110.                 Tcl_Interp *interp, Tcl_Command command));
  1111. EXTERN void        Tcl_DeleteChannelHandler _ANSI_ARGS_((
  1112.                     Tcl_Channel chan, Tcl_ChannelProc *proc,
  1113.                             ClientData clientData));
  1114. EXTERN void        Tcl_DeleteCloseHandler _ANSI_ARGS_((
  1115.                 Tcl_Channel chan, Tcl_CloseProc *proc,
  1116.                             ClientData clientData));
  1117. EXTERN void        Tcl_DeleteEvents _ANSI_ARGS_((
  1118.                 Tcl_EventDeleteProc *proc,
  1119.                             ClientData clientData));
  1120. EXTERN void        Tcl_DeleteEventSource _ANSI_ARGS_((
  1121.                 Tcl_EventSetupProc *setupProc,
  1122.                 Tcl_EventCheckProc *checkProc,
  1123.                 ClientData clientData));
  1124. EXTERN void        Tcl_DeleteExitHandler _ANSI_ARGS_((Tcl_ExitProc *proc,
  1125.                 ClientData clientData));
  1126. EXTERN void        Tcl_DeleteFileHandler _ANSI_ARGS_((int fd));
  1127. EXTERN void        Tcl_DeleteHashEntry _ANSI_ARGS_((
  1128.                 Tcl_HashEntry *entryPtr));
  1129. EXTERN void        Tcl_DeleteHashTable _ANSI_ARGS_((
  1130.                 Tcl_HashTable *tablePtr));
  1131. EXTERN void        Tcl_DeleteInterp _ANSI_ARGS_((Tcl_Interp *interp));
  1132. EXTERN void        Tcl_DeleteTimerHandler _ANSI_ARGS_((
  1133.                 Tcl_TimerToken token));
  1134. EXTERN void        Tcl_DeleteTrace _ANSI_ARGS_((Tcl_Interp *interp,
  1135.                 Tcl_Trace trace));
  1136. EXTERN void        Tcl_DetachPids _ANSI_ARGS_((int numPids, Tcl_Pid *pidPtr));
  1137. EXTERN void        Tcl_DontCallWhenDeleted _ANSI_ARGS_((
  1138.                 Tcl_Interp *interp, Tcl_InterpDeleteProc *proc,
  1139.                 ClientData clientData));
  1140. EXTERN int        Tcl_DoOneEvent _ANSI_ARGS_((int flags));
  1141. EXTERN void        Tcl_DoWhenIdle _ANSI_ARGS_((Tcl_IdleProc *proc,
  1142.                 ClientData clientData));
  1143. EXTERN char *        Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString *dsPtr,
  1144.                 CONST char *string, int length));
  1145. EXTERN char *        Tcl_DStringAppendElement _ANSI_ARGS_((
  1146.                 Tcl_DString *dsPtr, CONST char *string));
  1147. EXTERN void        Tcl_DStringEndSublist _ANSI_ARGS_((Tcl_DString *dsPtr));
  1148. EXTERN void        Tcl_DStringFree _ANSI_ARGS_((Tcl_DString *dsPtr));
  1149. EXTERN void        Tcl_DStringGetResult _ANSI_ARGS_((Tcl_Interp *interp,
  1150.                 Tcl_DString *dsPtr));
  1151. EXTERN void        Tcl_DStringInit _ANSI_ARGS_((Tcl_DString *dsPtr));
  1152. EXTERN void        Tcl_DStringResult _ANSI_ARGS_((Tcl_Interp *interp,
  1153.                 Tcl_DString *dsPtr));
  1154. EXTERN void        Tcl_DStringSetLength _ANSI_ARGS_((Tcl_DString *dsPtr,
  1155.                 int length));
  1156. EXTERN void        Tcl_DStringStartSublist _ANSI_ARGS_((
  1157.                 Tcl_DString *dsPtr));
  1158. EXTERN Tcl_Obj *    Tcl_DuplicateObj _ANSI_ARGS_((Tcl_Obj *objPtr));
  1159. EXTERN int        Tcl_Eof _ANSI_ARGS_((Tcl_Channel chan));
  1160. EXTERN char *        Tcl_ErrnoId _ANSI_ARGS_((void));
  1161. EXTERN char *        Tcl_ErrnoMsg _ANSI_ARGS_((int err));
  1162. EXTERN int        Tcl_Eval _ANSI_ARGS_((Tcl_Interp *interp,
  1163.                 char *string));
  1164. EXTERN int        Tcl_EvalFile _ANSI_ARGS_((Tcl_Interp *interp,
  1165.                 char *fileName));
  1166. EXTERN void        Tcl_EventuallyFree _ANSI_ARGS_((ClientData clientData,
  1167.                 Tcl_FreeProc *freeProc));
  1168. EXTERN int        Tcl_EvalObj _ANSI_ARGS_((Tcl_Interp *interp,
  1169.                 Tcl_Obj *objPtr));
  1170. EXTERN void        Tcl_Exit _ANSI_ARGS_((int status));
  1171. EXTERN int        Tcl_ExposeCommand _ANSI_ARGS_((Tcl_Interp *interp,
  1172.                     char *hiddenCmdToken, char *cmdName));
  1173. EXTERN int        Tcl_ExprBoolean _ANSI_ARGS_((Tcl_Interp *interp,
  1174.                 char *string, int *ptr));
  1175. EXTERN int        Tcl_ExprBooleanObj _ANSI_ARGS_((Tcl_Interp *interp,
  1176.                 Tcl_Obj *objPtr, int *ptr));
  1177. EXTERN int        Tcl_ExprDouble _ANSI_ARGS_((Tcl_Interp *interp,
  1178.                 char *string, double *ptr));
  1179. EXTERN int        Tcl_ExprDoubleObj _ANSI_ARGS_((Tcl_Interp *interp,
  1180.                 Tcl_Obj *objPtr, double *ptr));
  1181. EXTERN int        Tcl_ExprLong _ANSI_ARGS_((Tcl_Interp *interp,
  1182.                 char *string, long *ptr));
  1183. EXTERN int        Tcl_ExprLongObj _ANSI_ARGS_((Tcl_Interp *interp,
  1184.                 Tcl_Obj *objPtr, long *ptr));
  1185. EXTERN int        Tcl_ExprObj _ANSI_ARGS_((Tcl_Interp *interp,
  1186.                 Tcl_Obj *objPtr, Tcl_Obj **resultPtrPtr));
  1187. EXTERN int        Tcl_ExprString _ANSI_ARGS_((Tcl_Interp *interp,
  1188.                 char *string));
  1189. EXTERN void        Tcl_Finalize _ANSI_ARGS_((void));
  1190. EXTERN void        Tcl_FindExecutable _ANSI_ARGS_((char *argv0));
  1191. EXTERN Tcl_HashEntry *    Tcl_FirstHashEntry _ANSI_ARGS_((
  1192.                 Tcl_HashTable *tablePtr,
  1193.                 Tcl_HashSearch *searchPtr));
  1194. EXTERN int        Tcl_Flush _ANSI_ARGS_((Tcl_Channel chan));
  1195. EXTERN void        TclFreeObj _ANSI_ARGS_((Tcl_Obj *objPtr));
  1196. EXTERN void        Tcl_FreeResult _ANSI_ARGS_((Tcl_Interp *interp));
  1197. EXTERN int        Tcl_GetAlias _ANSI_ARGS_((Tcl_Interp *interp,
  1198.                        char *slaveCmd, Tcl_Interp **targetInterpPtr,
  1199.                             char **targetCmdPtr, int *argcPtr,
  1200.                 char ***argvPtr));
  1201. EXTERN int        Tcl_GetAliasObj _ANSI_ARGS_((Tcl_Interp *interp,
  1202.                        char *slaveCmd, Tcl_Interp **targetInterpPtr,
  1203.                             char **targetCmdPtr, int *objcPtr,
  1204.                 Tcl_Obj ***objv));
  1205. EXTERN ClientData    Tcl_GetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
  1206.                             char *name, Tcl_InterpDeleteProc **procPtr));
  1207. EXTERN int        Tcl_GetBoolean _ANSI_ARGS_((Tcl_Interp *interp,
  1208.                 char *string, int *boolPtr));
  1209. EXTERN int        Tcl_GetBooleanFromObj _ANSI_ARGS_((
  1210.                 Tcl_Interp *interp, Tcl_Obj *objPtr,
  1211.                 int *boolPtr));
  1212. EXTERN Tcl_Channel    Tcl_GetChannel _ANSI_ARGS_((Tcl_Interp *interp,
  1213.                     char *chanName, int *modePtr));
  1214. EXTERN int        Tcl_GetChannelBufferSize _ANSI_ARGS_((
  1215.                     Tcl_Channel chan));
  1216. EXTERN int        Tcl_GetChannelHandle _ANSI_ARGS_((Tcl_Channel chan,
  1217.                     int direction, ClientData *handlePtr));
  1218. EXTERN ClientData    Tcl_GetChannelInstanceData _ANSI_ARGS_((
  1219.                     Tcl_Channel chan));
  1220. EXTERN int        Tcl_GetChannelMode _ANSI_ARGS_((Tcl_Channel chan));
  1221. EXTERN char *        Tcl_GetChannelName _ANSI_ARGS_((Tcl_Channel chan));
  1222. EXTERN int        Tcl_GetChannelOption _ANSI_ARGS_((Tcl_Interp *interp,
  1223.                 Tcl_Channel chan, char *optionName,
  1224.                 Tcl_DString *dsPtr));
  1225. EXTERN Tcl_ChannelType * Tcl_GetChannelType _ANSI_ARGS_((Tcl_Channel chan));
  1226. EXTERN int        Tcl_GetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1227.                 char *cmdName, Tcl_CmdInfo *infoPtr));
  1228. EXTERN char *        Tcl_GetCommandName _ANSI_ARGS_((Tcl_Interp *interp,
  1229.                 Tcl_Command command));
  1230. EXTERN char *        Tcl_GetCwd _ANSI_ARGS_((char *buf, int len));
  1231. EXTERN int        Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp *interp,
  1232.                 char *string, double *doublePtr));
  1233. EXTERN int        Tcl_GetDoubleFromObj _ANSI_ARGS_((
  1234.                 Tcl_Interp *interp, Tcl_Obj *objPtr,
  1235.                 double *doublePtr));
  1236. EXTERN int        Tcl_GetErrno _ANSI_ARGS_((void));
  1237. EXTERN int        Tcl_GetErrorLine _ANSI_ARGS_((Tcl_Interp *interp));
  1238. EXTERN char *        Tcl_GetHostName _ANSI_ARGS_((void));
  1239. EXTERN int        Tcl_GetIndexFromObj _ANSI_ARGS_((Tcl_Interp *interp,
  1240.                 Tcl_Obj *objPtr, char **tablePtr, char *msg,
  1241.                 int flags, int *indexPtr));
  1242. EXTERN int        Tcl_GetInt _ANSI_ARGS_((Tcl_Interp *interp,
  1243.                 char *string, int *intPtr));
  1244. EXTERN int        Tcl_GetInterpPath _ANSI_ARGS_((Tcl_Interp *askInterp,
  1245.                 Tcl_Interp *slaveInterp));
  1246. EXTERN int        Tcl_GetIntFromObj _ANSI_ARGS_((Tcl_Interp *interp,
  1247.                 Tcl_Obj *objPtr, int *intPtr));
  1248. EXTERN int        Tcl_GetLongFromObj _ANSI_ARGS_((Tcl_Interp *interp,
  1249.                 Tcl_Obj *objPtr, long *longPtr));
  1250. EXTERN Tcl_Interp *    Tcl_GetMaster _ANSI_ARGS_((Tcl_Interp *interp));
  1251. EXTERN Tcl_Obj *    Tcl_GetObjResult _ANSI_ARGS_((Tcl_Interp *interp));
  1252. EXTERN Tcl_ObjType *    Tcl_GetObjType _ANSI_ARGS_((char *typeName));
  1253. EXTERN int        Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp *interp,
  1254.                 char *string, int write, int checkUsage,
  1255.                 ClientData *filePtr));
  1256. EXTERN Tcl_Command    Tcl_GetOriginalCommand _ANSI_ARGS_((
  1257.                 Tcl_Command command));
  1258. EXTERN Tcl_PathType    Tcl_GetPathType _ANSI_ARGS_((char *path));
  1259. EXTERN int        Tcl_Gets _ANSI_ARGS_((Tcl_Channel chan,
  1260.                     Tcl_DString *dsPtr));
  1261. EXTERN int        Tcl_GetsObj _ANSI_ARGS_((Tcl_Channel chan,
  1262.                     Tcl_Obj *objPtr));
  1263. EXTERN int        Tcl_GetServiceMode _ANSI_ARGS_((void));
  1264. EXTERN Tcl_Interp *    Tcl_GetSlave _ANSI_ARGS_((Tcl_Interp *interp,
  1265.                 char *slaveName));
  1266. EXTERN Tcl_Channel    Tcl_GetStdChannel _ANSI_ARGS_((int type));
  1267. EXTERN char *        Tcl_GetStringFromObj _ANSI_ARGS_((Tcl_Obj *objPtr,
  1268.                 int *lengthPtr));
  1269. EXTERN char *        Tcl_GetStringResult _ANSI_ARGS_((Tcl_Interp *interp));
  1270. EXTERN char *        Tcl_GetVar _ANSI_ARGS_((Tcl_Interp *interp,
  1271.                 char *varName, int flags));
  1272. EXTERN char *        Tcl_GetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1273.                 char *part1, char *part2, int flags));
  1274. EXTERN int        Tcl_GlobalEval _ANSI_ARGS_((Tcl_Interp *interp,
  1275.                 char *command));
  1276. EXTERN int        Tcl_GlobalEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
  1277.                 Tcl_Obj *objPtr));
  1278. EXTERN char *        Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable *tablePtr));
  1279. EXTERN int        Tcl_HideCommand _ANSI_ARGS_((Tcl_Interp *interp,
  1280.                     char *cmdName, char *hiddenCmdToken));
  1281. EXTERN int        Tcl_Init _ANSI_ARGS_((Tcl_Interp *interp));
  1282. EXTERN void        Tcl_InitHashTable _ANSI_ARGS_((Tcl_HashTable *tablePtr,
  1283.                 int keyType));
  1284. EXTERN void        Tcl_InitMemory _ANSI_ARGS_((Tcl_Interp *interp));
  1285. EXTERN int        Tcl_InputBlocked _ANSI_ARGS_((Tcl_Channel chan));
  1286. EXTERN int        Tcl_InputBuffered _ANSI_ARGS_((Tcl_Channel chan));
  1287. EXTERN int        Tcl_InterpDeleted _ANSI_ARGS_((Tcl_Interp *interp));
  1288. EXTERN int        Tcl_IsSafe _ANSI_ARGS_((Tcl_Interp *interp));
  1289. EXTERN void        Tcl_InvalidateStringRep _ANSI_ARGS_((
  1290.                 Tcl_Obj *objPtr));
  1291. EXTERN char *        Tcl_JoinPath _ANSI_ARGS_((int argc, char **argv,
  1292.                 Tcl_DString *resultPtr));
  1293. EXTERN int        Tcl_LinkVar _ANSI_ARGS_((Tcl_Interp *interp,
  1294.                 char *varName, char *addr, int type));
  1295. EXTERN int        Tcl_ListObjAppendList _ANSI_ARGS_((
  1296.                 Tcl_Interp *interp, Tcl_Obj *listPtr, 
  1297.                 Tcl_Obj *elemListPtr));
  1298. EXTERN int        Tcl_ListObjAppendElement _ANSI_ARGS_((
  1299.                 Tcl_Interp *interp, Tcl_Obj *listPtr,
  1300.                 Tcl_Obj *objPtr));
  1301. EXTERN int        Tcl_ListObjGetElements _ANSI_ARGS_((
  1302.                 Tcl_Interp *interp, Tcl_Obj *listPtr,
  1303.                 int *objcPtr, Tcl_Obj ***objvPtr));
  1304. EXTERN int        Tcl_ListObjIndex _ANSI_ARGS_((Tcl_Interp *interp,
  1305.                 Tcl_Obj *listPtr, int index, 
  1306.                 Tcl_Obj **objPtrPtr));
  1307. EXTERN int        Tcl_ListObjLength _ANSI_ARGS_((Tcl_Interp *interp,
  1308.                 Tcl_Obj *listPtr, int *intPtr));
  1309. EXTERN int        Tcl_ListObjReplace _ANSI_ARGS_((Tcl_Interp *interp,
  1310.                 Tcl_Obj *listPtr, int first, int count,
  1311.                 int objc, Tcl_Obj *CONST objv[]));
  1312. EXTERN void        Tcl_Main _ANSI_ARGS_((int argc, char **argv,
  1313.                 Tcl_AppInitProc *appInitProc));
  1314. EXTERN Tcl_Channel    Tcl_MakeFileChannel _ANSI_ARGS_((ClientData handle,
  1315.                 int mode));
  1316. EXTERN int        Tcl_MakeSafe _ANSI_ARGS_((Tcl_Interp *interp));
  1317. EXTERN Tcl_Channel    Tcl_MakeTcpClientChannel _ANSI_ARGS_((
  1318.                     ClientData tcpSocket));
  1319. EXTERN char *        Tcl_Merge _ANSI_ARGS_((int argc, char **argv));
  1320. EXTERN Tcl_HashEntry *    Tcl_NextHashEntry _ANSI_ARGS_((
  1321.                 Tcl_HashSearch *searchPtr));
  1322. EXTERN void        Tcl_NotifyChannel _ANSI_ARGS_((Tcl_Channel channel,
  1323.                 int mask));
  1324. EXTERN Tcl_Obj *    Tcl_ObjGetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1325.                 Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
  1326.                 int flags));
  1327. EXTERN Tcl_Obj *    Tcl_ObjSetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1328.                 Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
  1329.                 Tcl_Obj *newValuePtr, int flags));
  1330. EXTERN Tcl_Channel    Tcl_OpenCommandChannel _ANSI_ARGS_((
  1331.                     Tcl_Interp *interp, int argc, char **argv,
  1332.                 int flags));
  1333. EXTERN Tcl_Channel    Tcl_OpenFileChannel _ANSI_ARGS_((Tcl_Interp *interp,
  1334.                     char *fileName, char *modeString,
  1335.                             int permissions));
  1336. EXTERN Tcl_Channel    Tcl_OpenTcpClient _ANSI_ARGS_((Tcl_Interp *interp,
  1337.                 int port, char *address, char *myaddr,
  1338.                     int myport, int async));
  1339. EXTERN Tcl_Channel    Tcl_OpenTcpServer _ANSI_ARGS_((Tcl_Interp *interp,
  1340.                     int port, char *host,
  1341.                     Tcl_TcpAcceptProc *acceptProc,
  1342.                 ClientData callbackData));
  1343. EXTERN char *        Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp *interp,
  1344.                 char *string, char **termPtr));
  1345. EXTERN int        Tcl_PkgProvide _ANSI_ARGS_((Tcl_Interp *interp,
  1346.                 char *name, char *version));
  1347. EXTERN char *        Tcl_PkgRequire _ANSI_ARGS_((Tcl_Interp *interp,
  1348.                 char *name, char *version, int exact));
  1349. EXTERN char *        Tcl_PosixError _ANSI_ARGS_((Tcl_Interp *interp));
  1350. EXTERN void        Tcl_Preserve _ANSI_ARGS_((ClientData data));
  1351. EXTERN void        Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp *interp,
  1352.                 double value, char *dst));
  1353. EXTERN int        Tcl_PutEnv _ANSI_ARGS_((CONST char *string));
  1354. EXTERN void        Tcl_QueueEvent _ANSI_ARGS_((Tcl_Event *evPtr,
  1355.                 Tcl_QueuePosition position));
  1356. EXTERN int        Tcl_Read _ANSI_ARGS_((Tcl_Channel chan,
  1357.                     char *bufPtr, int toRead));
  1358. EXTERN void        Tcl_ReapDetachedProcs _ANSI_ARGS_((void));
  1359. EXTERN int        Tcl_RecordAndEval _ANSI_ARGS_((Tcl_Interp *interp,
  1360.                 char *cmd, int flags));
  1361. EXTERN int        Tcl_RecordAndEvalObj _ANSI_ARGS_((Tcl_Interp *interp,
  1362.                 Tcl_Obj *cmdPtr, int flags));
  1363. EXTERN Tcl_RegExp    Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp *interp,
  1364.                 char *string));
  1365. EXTERN int        Tcl_RegExpExec _ANSI_ARGS_((Tcl_Interp *interp,
  1366.                 Tcl_RegExp regexp, char *string, char *start));
  1367. EXTERN int        Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp *interp,
  1368.                 char *string, char *pattern));
  1369. EXTERN void        Tcl_RegExpRange _ANSI_ARGS_((Tcl_RegExp regexp,
  1370.                 int index, char **startPtr, char **endPtr));
  1371. EXTERN void        Tcl_RegisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
  1372.                     Tcl_Channel chan));
  1373. EXTERN void        Tcl_RegisterObjType _ANSI_ARGS_((
  1374.                 Tcl_ObjType *typePtr));
  1375. EXTERN void        Tcl_Release _ANSI_ARGS_((ClientData clientData));
  1376. EXTERN void        Tcl_RestartIdleTimer _ANSI_ARGS_((void));
  1377. EXTERN void        Tcl_ResetResult _ANSI_ARGS_((Tcl_Interp *interp));
  1378. #define Tcl_Return Tcl_SetResult
  1379. EXTERN int        Tcl_ScanCountedElement _ANSI_ARGS_((CONST char *string,
  1380.                 int length, int *flagPtr));
  1381. EXTERN int        Tcl_ScanElement _ANSI_ARGS_((CONST char *string,
  1382.                 int *flagPtr));
  1383. EXTERN int        Tcl_Seek _ANSI_ARGS_((Tcl_Channel chan,
  1384.                     int offset, int mode));
  1385. EXTERN int        Tcl_ServiceAll _ANSI_ARGS_((void));
  1386. EXTERN int        Tcl_ServiceEvent _ANSI_ARGS_((int flags));
  1387. EXTERN void        Tcl_SetAssocData _ANSI_ARGS_((Tcl_Interp *interp,
  1388.                             char *name, Tcl_InterpDeleteProc *proc,
  1389.                             ClientData clientData));
  1390. EXTERN void        Tcl_SetBooleanObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1391.                 int boolValue));
  1392. EXTERN void        Tcl_SetChannelBufferSize _ANSI_ARGS_((
  1393.                 Tcl_Channel chan, int sz));
  1394. EXTERN int        Tcl_SetChannelOption _ANSI_ARGS_((
  1395.                 Tcl_Interp *interp, Tcl_Channel chan,
  1396.                     char *optionName, char *newValue));
  1397. EXTERN int        Tcl_SetCommandInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1398.                 char *cmdName, Tcl_CmdInfo *infoPtr));
  1399. EXTERN void        Tcl_SetDoubleObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1400.                 double doubleValue));
  1401. EXTERN void        Tcl_SetErrno _ANSI_ARGS_((int err));
  1402. EXTERN void        Tcl_SetErrorCode _ANSI_ARGS_(
  1403.                     TCL_VARARGS(Tcl_Interp *,arg1));
  1404. EXTERN void        Tcl_SetIntObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1405.                 int intValue));
  1406. EXTERN void        Tcl_SetListObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1407.                 int objc, Tcl_Obj *CONST objv[]));
  1408. EXTERN void        Tcl_SetLongObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1409.                 long longValue));
  1410. EXTERN void        Tcl_SetMaxBlockTime _ANSI_ARGS_((Tcl_Time *timePtr));
  1411. EXTERN void        Tcl_SetObjErrorCode _ANSI_ARGS_((Tcl_Interp *interp,
  1412.                 Tcl_Obj *errorObjPtr));
  1413. EXTERN void        Tcl_SetObjLength _ANSI_ARGS_((Tcl_Obj *objPtr,
  1414.                 int length));
  1415. EXTERN void        Tcl_SetObjResult _ANSI_ARGS_((Tcl_Interp *interp,
  1416.                 Tcl_Obj *resultObjPtr));
  1417. EXTERN void        Tcl_SetPanicProc _ANSI_ARGS_((void (*proc)
  1418.                 _ANSI_ARGS_(TCL_VARARGS(char *, format))));
  1419. EXTERN int        Tcl_SetRecursionLimit _ANSI_ARGS_((Tcl_Interp *interp,
  1420.                 int depth));
  1421. EXTERN void        Tcl_SetResult _ANSI_ARGS_((Tcl_Interp *interp,
  1422.                 char *string, Tcl_FreeProc *freeProc));
  1423. EXTERN int        Tcl_SetServiceMode _ANSI_ARGS_((int mode));
  1424. EXTERN void        Tcl_SetStdChannel _ANSI_ARGS_((Tcl_Channel channel,
  1425.                 int type));
  1426. EXTERN void        Tcl_SetStringObj _ANSI_ARGS_((Tcl_Obj *objPtr, 
  1427.                 char *bytes, int length));
  1428. EXTERN void        Tcl_SetTimer _ANSI_ARGS_((Tcl_Time *timePtr));
  1429. EXTERN char *        Tcl_SetVar _ANSI_ARGS_((Tcl_Interp *interp,
  1430.                 char *varName, char *newValue, int flags));
  1431. EXTERN char *        Tcl_SetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1432.                 char *part1, char *part2, char *newValue,
  1433.                 int flags));
  1434. EXTERN char *        Tcl_SignalId _ANSI_ARGS_((int sig));
  1435. EXTERN char *        Tcl_SignalMsg _ANSI_ARGS_((int sig));
  1436. EXTERN void        Tcl_Sleep _ANSI_ARGS_((int ms));
  1437. EXTERN void        Tcl_SourceRCFile _ANSI_ARGS_((Tcl_Interp *interp));
  1438. EXTERN int        Tcl_SplitList _ANSI_ARGS_((Tcl_Interp *interp,
  1439.                 char *list, int *argcPtr, char ***argvPtr));
  1440. EXTERN void        Tcl_SplitPath _ANSI_ARGS_((char *path,
  1441.                 int *argcPtr, char ***argvPtr));
  1442. EXTERN void        Tcl_StaticPackage _ANSI_ARGS_((Tcl_Interp *interp,
  1443.                 char *pkgName, Tcl_PackageInitProc *initProc,
  1444.                 Tcl_PackageInitProc *safeInitProc));
  1445. EXTERN int        Tcl_StringMatch _ANSI_ARGS_((char *string,
  1446.                 char *pattern));
  1447. EXTERN int        Tcl_Tell _ANSI_ARGS_((Tcl_Channel chan));
  1448. #define Tcl_TildeSubst Tcl_TranslateFileName
  1449. EXTERN int        Tcl_TraceVar _ANSI_ARGS_((Tcl_Interp *interp,
  1450.                 char *varName, int flags, Tcl_VarTraceProc *proc,
  1451.                 ClientData clientData));
  1452. EXTERN int        Tcl_TraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1453.                 char *part1, char *part2, int flags,
  1454.                 Tcl_VarTraceProc *proc, ClientData clientData));
  1455. EXTERN char *        Tcl_TranslateFileName _ANSI_ARGS_((Tcl_Interp *interp,
  1456.                 char *name, Tcl_DString *bufferPtr));
  1457. EXTERN int        Tcl_Ungets _ANSI_ARGS_((Tcl_Channel chan, char *str,
  1458.                 int len, int atHead));
  1459. EXTERN void        Tcl_UnlinkVar _ANSI_ARGS_((Tcl_Interp *interp,
  1460.                 char *varName));
  1461. EXTERN int        Tcl_UnregisterChannel _ANSI_ARGS_((Tcl_Interp *interp,
  1462.                 Tcl_Channel chan));
  1463. EXTERN int        Tcl_UnsetVar _ANSI_ARGS_((Tcl_Interp *interp,
  1464.                 char *varName, int flags));
  1465. EXTERN int        Tcl_UnsetVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1466.                 char *part1, char *part2, int flags));
  1467. EXTERN void        Tcl_UntraceVar _ANSI_ARGS_((Tcl_Interp *interp,
  1468.                 char *varName, int flags, Tcl_VarTraceProc *proc,
  1469.                 ClientData clientData));
  1470. EXTERN void        Tcl_UntraceVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1471.                 char *part1, char *part2, int flags,
  1472.                 Tcl_VarTraceProc *proc, ClientData clientData));
  1473. EXTERN void        Tcl_UpdateLinkedVar _ANSI_ARGS_((Tcl_Interp *interp,
  1474.                 char *varName));
  1475. EXTERN int        Tcl_UpVar _ANSI_ARGS_((Tcl_Interp *interp,
  1476.                 char *frameName, char *varName,
  1477.                 char *localName, int flags));
  1478. EXTERN int        Tcl_UpVar2 _ANSI_ARGS_((Tcl_Interp *interp,
  1479.                 char *frameName, char *part1, char *part2,
  1480.                 char *localName, int flags));
  1481. EXTERN int        Tcl_VarEval _ANSI_ARGS_(
  1482.                     TCL_VARARGS(Tcl_Interp *,interp));
  1483. EXTERN ClientData    Tcl_VarTraceInfo _ANSI_ARGS_((Tcl_Interp *interp,
  1484.                 char *varName, int flags,
  1485.                 Tcl_VarTraceProc *procPtr,
  1486.                 ClientData prevClientData));
  1487. EXTERN ClientData    Tcl_VarTraceInfo2 _ANSI_ARGS_((Tcl_Interp *interp,
  1488.                 char *part1, char *part2, int flags,
  1489.                 Tcl_VarTraceProc *procPtr,
  1490.                 ClientData prevClientData));
  1491. EXTERN int        Tcl_WaitForEvent _ANSI_ARGS_((Tcl_Time *timePtr));
  1492. EXTERN Tcl_Pid        Tcl_WaitPid _ANSI_ARGS_((Tcl_Pid pid, int *statPtr, 
  1493.                 int options));
  1494. EXTERN int        Tcl_Write _ANSI_ARGS_((Tcl_Channel chan,
  1495.                 char *s, int slen));
  1496. EXTERN void        Tcl_WrongNumArgs _ANSI_ARGS_((Tcl_Interp *interp,
  1497.                 int objc, Tcl_Obj *CONST objv[], char *message));
  1498.  
  1499. #endif /* RESOURCE_INCLUDED */
  1500. #endif /* _TCL */
  1501.